<template>
    <div class="yd-dialog-box">
        <el-dialog
            :visible.sync="yddialogVisible"
            :close-on-click-modal="false"
            title="请选择云店"
            width="700px"
            top="20vh"
            class="yd-dialog"
            :before-close="handleClose"
        >
            <div class="yd-info-box">
                <div class="tis-box">发布后不可修改</div>
                <div class="yd-box">
                    <div
                        class="yd-row"
                        v-for="item in data_list"
                        :key="item.id"
                        @click="createnowFun(item)"
                    >
                        {{ item.name }}
                    </div>
                </div>
            </div>
        </el-dialog>
    </div>
</template>

<script>
// import xxx from '@/components/comm/xxx.vue';
export default {
    props: [],
    components: {},
    computed: {},
    data() {
        return {
            yddialogVisible: false, //云店
            data_list: [],
            cat_id: "",
            hd_type: "",
            tool_id: "",
        };
    },
    created() {},
    mounted() {},
    methods: {
        initData(data) {
            this.yddialogVisible = true;
            this.data_list = data.ls;
            this.cat_id = data.cat_id;
            this.hd_type = data.hd_type;
            this.tool_id = data.tool_id;
        },
        createnowFun(item) {
            this.yddialogVisible = false;
            uni.navigateTo({
                url: `/pages/interactiveActivity/create-activity?page_tab=1&cat_id=${this.cat_id}&hd_type=${this.hd_type}&tool_id=${this.tool_id}&idyun=${item.id}`,
            });
        },
        handleClose() {
            this.$emit("handleClose");
        },
    },
};
</script>

<style lang="scss" scoped>
::v-deep.yd-dialog {
    .el-dialog__body {
        padding-top: 0;
    }
}
.yd-info-box {
    .tis-box {
    }
    .yd-box {
        display: flex;
        flex-wrap: wrap;
        .yd-row {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100px;
            padding: 10px;
            border-radius: 5px;
            border: 1px solid #d7d7d7;
            margin-right: 10px;
            margin-top: 10px;
            cursor: pointer;
            &:hover {
                background: #3989fc;
                color: #fff;
            }
        }
    }
}
</style>
